package com.headingdata.d1_inner_class1;

public class Outer {
    private int age = 99;
    public static String name = "wj";

    public class Inner{
        private String name = "inner";
        public  static String schoolName;//jdk 16 开始才支持静态成员变量
        private int age = 88;

        public void test(){
            int age = 66;
            System.out.println(age);//66
            System.out.println(this.age);//88
            System.out.println(Outer.this.age);//99

        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public static String getSchoolName() {
            return schoolName;
        }

        public static void setSchoolName(String schoolName) {
            Inner.schoolName = schoolName;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }
    }
}
